package org.example.design.status01;

import com.alibaba.fastjson.JSON;
import org.example.design.status01.bean.ActivityService;
import org.example.design.status01.bean.Status;
import org.example.design.status01.controller.ActivityExecStatusController;
import org.example.design.status01.controller.Result;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * @Classname Test
 * @Description TODO
 * @Date 2020/11/11 2:22 下午
 * @Created by xiangjd
 */
public class Test {
    private static Logger logger  = LoggerFactory.getLogger(Test.class);

    public static void main(String[] args) {
        // 初始化数据
        String activityId = "100001";
        ActivityService.init(activityId, Status.Editing);

        ActivityExecStatusController activityExecStatusController = new ActivityExecStatusController();
        Result resultRefuse = activityExecStatusController.execStatus(activityId, Status.Editing, Status.Refuse);
        logger.info("测试结果(编辑中To审核拒绝)：{}", JSON.toJSONString(resultRefuse));

        Result resultCheck = activityExecStatusController.execStatus(activityId, Status.Editing, Status.Check);
        logger.info("测试结果(编辑中To提交审核)：{}", JSON.toJSONString(resultCheck));
    }
}
